package saas.dev.clouduserconsumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import saas.dev.clouduserconsumer.service.UserTestService;

import javax.annotation.Resource;

/**
 * @ClassName : UserTestOpenFeignController
 * @Author : y1
 * @Date: 2021/4/29 00:10
 * @Description : 使用feign 调用 生产者接口
 */
@RestController
public class UserTestOpenFeignController {
    @Resource
    private UserTestService userTestService;
    @Value("${server.port}")
    private String port;
    /**
     * 测试feign调用生产者
     *
     * @return
     */
    @GetMapping("/test")
    public String testOpenFeign() {
        return "端口：".concat(port).concat(userTestService.testOpenFeign());
    }
}
